package com.example.demoserver.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demoserver.entity.InteDatapoint;
import com.example.demoserver.service.InteDatapointService;
import com.example.demoserver.mapper.InteDatapointMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 18364
* @description 针对表【inte_datapoint】的数据库操作Service实现
* @createDate 2024-02-27 10:56:06
*/
@Service
public class InteDatapointServiceImpl extends ServiceImpl<InteDatapointMapper, InteDatapoint>
    implements InteDatapointService{
    @Autowired
    InteDatapointMapper inteDatapointMapper;
    @Override
    public List<InteDatapoint> selectData(Integer id) {
        QueryWrapper<InteDatapoint> wrapper=new QueryWrapper<InteDatapoint>();
        wrapper.eq("gatewayid",id);
        wrapper.orderByDesc("updatetime");
        List<InteDatapoint> list=inteDatapointMapper.selectList(wrapper);
        return list;
    }
}




